///  author : zhangjiang
///  date : 2024/1/29
///  description :source_category_model


import 'package:flutter_android_tv/Routes/Model/source_info_model.dart';
import 'package:json_annotation/json_annotation.dart';

part 'source_category_model.g.dart';

@JsonSerializable()
class SourceCategoryModel {
  final String name;
  late List<SourceInfoModel> sources;
  late bool isChoose = false;

  SourceCategoryModel({required this.name, required this.sources,this.isChoose = false});

  //创建的实力方法
  factory SourceCategoryModel.fromJson(Map<String, dynamic> json) => _$SourceCategoryModelFromJson(json);

  //user转化为json数据
  Map<String, dynamic> toJson() => _$SourceCategoryModelToJson(this);
}